<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns="http://www.w3.org/1999/xhtml">
	
	<xsl:output method="xml"/>
	
	<xsl:template match="*[node()]">
		<table>
			<tr>
				<td class="trContentFields" width="150">
					<b><xsl:value-of select="@name"/></b>
				</td>
				<td class="tdContentLight">
					<pre>
						<xsl:value-of select="."/>
					</pre>
				</td>
			</tr>
		</table>
	</xsl:template>
    
	<xsl:template match="/service">
		<table align="center" border="0" cellpadding="2" width="98%" cellspacing="0"
			class="bordasimples">
			<tr>
				<th class="hrHeader" colspan="2">
					<xsl:value-of select="./@action"/>
					<xsl:text> - </xsl:text>
					<xsl:value-of select="./@name"/>
				</th>
			</tr>
            <xsl:if test="count(/service/param) > 0">
			<tr>
				<td>
					<table border="0" width="100%">
						<xsl:apply-templates />
					</table>
				</td>
			</tr>
            </xsl:if>
		</table>
	</xsl:template>

	<xsl:template match="text()">
		<xsl:if test="normalize-space(.)">
			<xsl:value-of select="."/>
		</xsl:if>
	</xsl:template>
	
	<xsl:template match="/bean">
		<table align="center" border="0" cellpadding="2" width="98%" cellspacing="0" class="bordasimples">
	        <xsl:for-each select="child::*/child::*">
	        	<tr>
          			<td class="trContentFields" width="150">
          				<b><xsl:value-of select="name(.)" /></b>
          			</td>
          			<td class="tdContentLight">
          				<xsl:value-of select="." />
          			</td>
       			</tr>
        	</xsl:for-each>
    	</table>
	</xsl:template>
	
</xsl:stylesheet>